<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>个人信息</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" type="text/css" href="/static/manage/common/layui/css/layui.css" media="all">
		<link rel="stylesheet" type="text/css" href="/static/manage/common/bootstrap/css/bootstrap.css" media="all">
		<link rel="stylesheet" type="text/css" href="/static/manage/common/global.css" media="all">
		<link rel="stylesheet" type="text/css" href="/static/manage/css/personal.css" media="all">
		<script type="text/javascript" src="/static/manage/common/layui/layui.js"></script>
		<script type="text/javascript">
			function checkAll(){
				var qx = document.getElementById("qx");
				var qxson = document.getElementsByClassName("ck");
				for (var i = 0;i<qxson.length;i++) {
					qxson[i].checked=qx.checked
				}
			}
			//	数组
		function Lond_ckeck(objname) {
			obj = document.getElementsByClassName(objname);
			checkval = [];
			for(k in obj) {
				if(obj[k].checked)
					checkval.push(obj[k].value);
			}
			return checkval;
		}
	
		function drop() {
			
//			alert(Lond_ckeck('ck').length);
			if (Lond_ckeck("ck").length!=0) {
				window.location.href="/sysuser/delSysUser?id="+Lond_ckeck('ck');
			}else{
				alert("您未选择要删除的信息")
			}
		}
		
		function formReset () {
			document.getElementById("zh").value=''
			document.getElementById("xm").value=''
			document.getElementById("start").value=''
			document.getElementById("end").value=''
			document.getElementById("phone").value=''
			document.getElementById("email").value=''
			document.getElementById("sex").value=0
			document.getElementById("zt").value=0
		}
		
		</script>
	</head>

	<body>
		<section class="layui-larry-box">
			<div class="larry-personal">
				<div class="layui-tab">
					<blockquote class="layui-elem-quote news_search">
						<div class="layui-inline">
						<form id="myform">
							<div class="layui-input-inline">
								<input id="zh" placeholder="请输入用户账号" class="layui-input search_input input-sm" type="text">
							</div>
							<div class="layui-input-inline">
								<input id="xm" placeholder="请输入用户姓名" class="layui-input search_input input-sm" type="text">
							</div>
							
							<div class="layui-input-inline">创建日期：</div>
							<div class="layui-input-inline">
								<input id="start" type="date" class="layui-input search_input input-sm">
							</div>
							
							<div class="layui-input-inline">至：</div>
							<div class="layui-input-inline">
								<input id="end" type="date" class="layui-input search_input input-sm">
							</div>
							
							<br />
							<div class="layui-input-inline">
								<input id="phone" placeholder="请输入手机号码" class="layui-input search_input input-sm" type="text">
							</div>
							<div class="layui-input-inline">
								<input id="email" placeholder="请输入邮箱" class="layui-input search_input input-sm" type="text">
							</div>
							
							<div class="layui-input-inline">
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;性别：
								<select name="" id="sex" style="width: 100px;">
									<option value="0"></option>
									<option value="1">男</option>
									<option value="2">女</option>
									<option value="3">未知</option>
								</select>
							</div>
							<div class="layui-input-inline">
								&nbsp;&nbsp;用户状态：
								<select name="" id="zt" style="width: 100px;">
									<option value="0"></option>
									<option value="1">正常</option>
									<option value="2">停用</option>
									<option value="3">锁定</option>
								</select>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</div>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a class="layui-btn search_btn layui-btn-small">查询</a>
							<a class="layui-btn layui-btn-danger layui-btn-small" onclick="formReset()">重置</a>
						</form>
						</div>
					</blockquote>

					<div class="layui-tab-content larry-personal-body clearfix mylog-info-box">
						<!-- 操作日志 -->
						<div class="layui-tab-item layui-field-box layui-show">
							<table class="layui-table table-hover" lay-even="" lay-skin="nob">
								<thead>
									<tr align="left">
										<td colspan="4">
											<a class="layui-btn layui-btn-normal layui-btn-small news_collect"><i class="layui-icon"></i> 新增</a>
											<a class="layui-btn layui-btn-small news_edit"><i class="iconfont icon-edit"></i> 编辑</a>
											<a href="javascript:;" class="layui-btn layui-btn-small"><i class="iconfont icon-shanchu1"></i>密码重置</a>
											<a class="layui-btn layui-btn-danger layui-btn-small news_del" data-id="7" onclick="drop()"><i class="layui-icon"></i> 删除</a>
										</td>
										<td colspan="7"></td>
									</tr>
									<tr>
										<th><input type="checkbox" id="qx" onclick="checkAll()"></th>
										<th>用户账号</th>
										<th>用户名</th>
										<th>所属机构</th>
										<th>所属角色</th>
										<th>性别</th>
										<th>手机号码</th>
										<th>邮箱</th>
										<th>界面风格</th>
										<th>用户状态</th>
										<th>创建时间</th>
									</tr>
								</thead>
								<c:forEach items="${sysuserData }" var="data">
								<thead>
									<tr>
										<th><input type="checkbox" class="ck" value="${data.user_id}"></th>
										<th>${data.account }</th>
										<th>${data.username }</th>
										<th>${data.sysDept.dept_name }</th>
										<th>
											<c:forEach items="${data.sysRole }" var="rolename">
												${rolename.role_name } &nbsp;
											</c:forEach>
										</th>
										<th>
											<c:if test="${data.sex==1 }">男</c:if>
											<c:if test="${data.sex==2 }">女</c:if>
											<c:if test="${data.sex==3 }">未知</c:if>
										</th>
										<th>${data.mobile }</th>
										<th>${data.email }</th>
										<th>${data.style }</th>
										<th>
											<c:if test="${data.status==1 }">正常</c:if>
											<c:if test="${data.status==2 }">停用</c:if>
											<c:if test="${data.status==3 }">锁定</c:if>
										</th>
										<th>${data.create_time }</th>
									</tr>
								</thead>
								</c:forEach>
							</table>
						</div>
					</div>
				</div>
			</div>
		</section>
	</body>

</html>